package abstractFactory.factory;

public class FactoryProvider {
    private static final String APPLE = FactoryEnum.APPLE.getBrand();
    private static final String DELL = FactoryEnum.DELL.getBrand();

    public static AbstrctFactory getComputerFactory(FactoryEnum factoryEnum) {
        if (APPLE.equals(factoryEnum.getBrand())) {
            return new AppleFactory();
        }
        if (DELL.equals(factoryEnum.getBrand())) {
            return new DellFactory();
        }
        return null;
    }
}
